<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="test">

    </div>
    <script>
        (function ($) {
        $.fn.myPlugins = function (options) {
        //参数赋值
        options = $.extend(defaults, options);//对象合并
        this.each(function () {
            //执行代码逻辑
            consol.log(options)
        });
        };
    })(jQuery);

    $('test').myPlugins({a: 1});
    </script>
</body>
</html>